using SmartSoft.DAL;
using System.Web.Services;
using System;
using System.Data;
using System.Data.SqlClient;


[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.None)]
public class WSCDZDataAccess : System.Web.Services.WebService
{
    private CDZDataAccess objDataAccess = new CDZDataAccess();
    public WSCDZDataAccess()
{
}


    [WebMethod]
    public bool Delete(object po_KeyCode)
{
object[] arr = Validator.Validate(po_KeyCode);
return objDataAccess.Delete(arr[0]);
}

    [WebMethod(MessageName = "3Params", Description = "", EnableSession = true)]
    public DataTable GetDataTable(string ps_Subsidiary, object pd_Ngay_Ct, object ps_Loai_DD)
{
object[] arr = Validator.Validate(pd_Ngay_Ct, ps_Loai_DD);
return objDataAccess.GetDataTable(ps_Subsidiary, arr[0], arr[1]);
}

    [WebMethod(MessageName = "4Params", Description = "", EnableSession = true)]
    public DataTable GetDataTable(string ps_Subsidiary, object pd_Ngay_Ct, object ps_Loai_DD, object ps_Code)
{
object[] arr = Validator.Validate(pd_Ngay_Ct, ps_Loai_DD, ps_Code);
return objDataAccess.GetDataTable(ps_Subsidiary, arr[0], arr[1], arr[2]);
}

    [WebMethod]
    public int Save(bool pb_NewChecked, DataTable tableRow)
{

return objDataAccess.Save(pb_NewChecked, tableRow.Rows[0]);
}
}
